import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';

// /sysDictData/list 获取字典值
export const sysDictDataList = (params: object) => {
	return request({
		url: '/sysDictData/list',
		method: 'get',
		data: params,
	});
}

// 多文件上传 /sysFileInfo/multipleUpload
export const sysFileInfoMultipleUpload = (params: object) => {
	return request({
		url: '/sysFileInfo/multipleUpload',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// /sysFileInfo/page 分页获取文件列表
export const sysFileInfoPage = (params: object) => {
	return request({
		url: '/sysFileInfo/page',
		method: 'get',
		data: params,
	});
}

// /sysFileInfo/delete 删除文件
export const sysFileInfoDelete = (params: object) => {
	return request({
		url: '/sysFileInfo/delete',
		method: 'post',
		data: params,
	});
}

// /sysFileInfo/preview 预览文件
export const sysFileInfoPreview = (params: object) => {
	return request({
		url: '/sysFileInfo/preview',
		method: 'get',
		data: params,
	});
}

// /sysFileInfo/previewBase64 预览文件base64
export const sysFileInfoPreviewBase64 = (params: object) => {
	return request({
		url: '/sysFileInfo/previewBase64',
		method: 'get',
		data: params,
	});
}

// /sysUser/selector 获取用户列表
export const sysUserSelector = (params: object) => {
	return request({
		url: '/sysUser/selector',
		method: 'get',
		data: params,
	});
}

// /sysOrg/list 获取组织架构列表
export const sysOrgList = (params: object) => {
	return request({
		url: '/sysOrg/list',
		method: 'get',
		data: params,
	});
}

// /sysOrg/tree 组织架构树
export const sysOrgTree = (params: object) => {
	return request({
		url: '/sysOrg/tree',
		method: 'get',
		data: params,
	});
}

// /sysPos/list 职位服务 下拉列表
export const sysPosList = (params: object) => {
	return request({
		url: '/sysPos/list',
		method: 'get',
		data: params,
	});
}